<template>
  <header style="position: absolute;top: 0;left: 0;width: 100%" >
    <div style="position: relative;z-index: 200" @click="closePull">
    <top-header title='优惠券' :hasTitle="true" :hasList="true" :hasCart="true" ></top-header>
    </div>
    <tab-head :titleInfor = "titleInfor" :pullDownMemu="true" ref="tabHead"></tab-head>
  </header>

</template>

<script>
  import TabHead from '@/real-components/TabHeadOrder'
  import {mapGetters} from 'vuex'
  import TopHeader from '@/real-containers/header'
  import {getPageTree, initDomTree} from '../../../utils/getPageTree'
  import axios from 'axios';

  export default {
    data () {
      return {
        page: "goodsClassify",
        componentName: "goodsClassifyHeader",
        titleInfor: [
          {
            goodsClassName: '全部',
          },
          {

            goodsClassName: '未使用',
          },
          {

            goodsClassName: '已过期',
          }
        ]
      }
    },
    props: {
      pageTitle :{
        type: String,
        default : ""
      }
    },
    components: {
      TabHead,
      TopHeader
    },
    computed: {
      ...mapGetters([
        "getDomTree"
      ]),
      pageTree () {
        return getPageTree(this, this.page);
      }
    },

    methods: {
      //关闭下拉菜单
      closePull () {
        var tabHead = this.$refs.tabHead
        tabHead && tabHead.closeClassifyClum()
      }
    },
    beforeCreate () {
      var index = this.$route.query.pageIndex
    },
    created () {
//      this.getData();
    },
    mounted () {
      // initDomTree(this.getDomTree[this.page]);

    },
    updated() {
      //页面更新完毕
      // initDomTree(this.getDomTree[this.page]);
    }
  }
</script>

<style>

</style>
